feat: add loading skeleton, error states, and empty state to leaderboard UI#208
Merged
jagdish-15 merged 4 commits intoJun 18, 2026
Merged
Conversation
Contributor
|
Thank you for submitting a pull request. Please ensure your changes comply with the project's contribution guidelines and that all workflow checks pass successfully. Formatting and Branching
|
…ard UI Implement Issue codepvg#179: Loading Skeleton + Error States for Leaderboard. - Add 8 skeleton shimmer rows (desktop) and 8 skeleton cards (mobile) that display on page load, naturally cleared by renderLeaderboard() - Add error banner with [RETRY] button when all 4 data endpoints fail - Error re-fetches data on click, clears cached entries - Add empty state message when API returns no data - Add CSS shimmer animation, fade-in transition for data rows - All states responsive — skeleton rows hidden on mobile, skeleton cards hidden on desktop Resolves codepvg#179
8aba773 to
3b21914
Compare
jagdish-15
requested changes
Jun 18, 2026
…comments All 33 section header comments in main.css had Unicode box-drawing characters (U+2500, U+2014, U+2192, U+2794) that got corrupted during an earlier encoding conversion, rendering as '??????' in GitHub's diff. - ─ (U+2500) → -- - — (U+2014) → --- - → (U+2192) → -> - ➔ (U+2794) → > Rebuilt the file from the clean upstream base to avoid any lingering encoding corruption. All CSS content values using arrows were converted to their ASCII equivalents. Fixes review feedback on PR codepvg#208.
jagdish-15
requested changes
Jun 18, 2026
jagdish-15
approved these changes
Jun 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add visual feedback states to the leaderboard page: loading skeleton shimmer on initial load, error banner with retry when the GitHub raw data API is unreachable, and an empty state message when no data exists.
Linked Issue
Fixes #179
Changes Made
#leaderboard-bodyand#mobile-cards. No separate show/hide toggles:renderLeaderboard()clears them naturally viainnerHTML = ""when data arrives.[!]icon,LEADERBOARD_DATA_UNAVAILABLEmessage, description, and[RETRY]button. Shown when all 4 data endpoints (overall.json,monthly.json,weekly.json,daily.json) fail. Retry clears cached data and re-fetches from scratch.[SYS]: NO_LEADERBOARD_DATA_YETin both desktop and mobile containers.@keyframes skeleton-shimmeranimation, skeleton row/card styles, error/empty state styles, and responsive overrides. Data rows usefadeInanimation for smooth skeleton-to-data transition.Files modified:
frontend/leaderboard.html— Skeleton HTML markup, error banner HTML, inline JS for error/empty state handlingfrontend/styles/main.css— All skeleton, error, and empty state styles + animationsType of Change
Testing
How to test:
frontend/leaderboard.html— skeleton shimmer appears initiallyraw.githubusercontent.comin devtools Network panel and reload — error banner with[RETRY]appearsNO_LEADERBOARD_DATA_YETmessage shownChecklist
npx prettier --write .before submittingfeature/*branch, not themainbranchScreenshots / Screen Recording